
class DDSearchUserModel {

  final String? userId;
  final String? nickname;
  final String? avatar;
  final String? avatarMapPath;
  final int? gender;
  final int? age;
  final String? country;
  final String? status;
  final int? callCoins;
  final String? unit;
  final List<String>? videoMapPaths;
  final int? followNum;
  final bool? isFriend;
  final bool? isMultiple;
  final String? about;
  final int? grade;
  final String? analysisLanguage;
  final bool? isSignBroadcaster;
  final int? showRoomVersion;
  final int? broadcasterType;

  DDSearchUserModel({
    this.userId,
    this.nickname,
    this.avatar,
    this.avatarMapPath,
    this.gender,
    this.age,
    this.country,
    this.status,
    this.callCoins,
    this.unit,
    this.videoMapPaths,
    this.followNum,
    this.isFriend,
    this.isMultiple,
    this.about,
    this.grade,
    this.analysisLanguage,
    this.isSignBroadcaster,
    this.showRoomVersion,
    this.broadcasterType,
  });

  factory DDSearchUserModel.fromJson(Map<String, dynamic> json) {
    return DDSearchUserModel(
      userId: json['userId'] as String?,
      nickname: json['nickname'] as String?,
      avatar: json['avatar'] as String?,
      avatarMapPath: json['avatarMapPath'] as String?,
      gender: json['gender'] as int?,
      age: json['age'] as int?,
      country: json['country'] as String?,
      status: json['status'] as String?,
      callCoins: json['callCoins'] as int?,
      unit: json['unit'] as String?,
      videoMapPaths: (json['videoMapPaths'] as List<dynamic>?)?.map((item) => item as String).toList(),
      followNum: json['followNum'] as int?,
      isFriend: json['isFriend'] as bool?,
      isMultiple: json['isMultiple'] as bool?,
      about: json['about'] as String?,
      grade: json['grade'] as int?,
      analysisLanguage: json['analysisLanguage'] as String?,
      isSignBroadcaster: json['isSignBroadcaster'] as bool?,
      showRoomVersion: json['showRoomVersion'] as int?,
      broadcasterType: json['broadcasterType'] as int?,
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'userId': userId,
      'nickname': nickname,
      'avatar': avatar,
      'avatarMapPath': avatarMapPath,
      'gender': gender,
      'age': age,
      'country': country,
      'status': status,
      'callCoins': callCoins,
      'unit': unit,
      'videoMapPaths': videoMapPaths,
      'followNum': followNum,
      'isFriend': isFriend,
      'isMultiple': isMultiple,
      'about': about,
      'grade': grade,
      'analysisLanguage': analysisLanguage,
      'isSignBroadcaster': isSignBroadcaster,
      'showRoomVersion': showRoomVersion,
      'broadcasterType': broadcasterType,
    };
  }
}
